package com.qianli.cashmama.trade.common.enums;

/**
 * Created with IntelliJ IDEA.
 * User: sm
 * Date: 2017/7/24
 * Time: 上午10:54
 */
public enum BillStatusEnum {
    INIT(0, "未还"),
    PAID(1, "还清");

    private int status;
    private String desc;

    BillStatusEnum(int status, String desc) {
        this.status = status;
        this.desc = desc;
    }

    public int getStatus() {
        return status;
    }

    public String getDesc() {
        return desc;
    }

    public static BillStatusEnum conventByStatus(int status) {
        BillStatusEnum billStatusEnum = null;
        for (BillStatusEnum statusEnum : BillStatusEnum.values()) {
            if (statusEnum.getStatus() == status) {
                billStatusEnum = statusEnum;
                break;
            }
        }

        return billStatusEnum;
    }
}
